#!/bin/sh
check=$(id -u)
if [ $check != 0 ]
then
    echo "You must be root to install this module"
else
  cp ./pamela.py /lib/security/
  if test -e "/etc/pam.d/login"
  then
      echo -e "#PAMELA \nsession optional pam_python.so pamela.py" >> /etc/pam.d/login
  fi
  if test -e "/etc/pam.d/gdm3"
  then
      echo -e "#PAMELA \nsession optional pam_python.so pamela.py" >> /etc/pam.d/gdm3
  fi
fi